import { View, Text, StyleSheet, Image, Button } from "react-native";
import React from "react";
import { scaleSizeW, scaleSizeH, setSpText } from "../utils/ScreenUtil";
import { AntDesign } from "@expo/vector-icons";
import TouchButton from "../components/TouchButton";
export default function Test() {
    console.log("container:", styles.container);
    const handlePress = () => {
        console.log("hello");
    }
    return (
        <View style={styles.container}>
            <Image
                source={require("../assets/images/vscode.png")}
                style={{ width: scaleSizeW(447), height: scaleSizeH(454) }}
            ></Image>
            <Text
                style={[
                    styles.textColor,
                    styles.textSize,
                    { border: "1px solid red" },
                ]}
            >
                Test
            </Text>
            <AntDesign
                name="clouddownload"
                size={setSpText(100)}
                color="#e2e2e2"
            />
            {/* <Button title="按钮" color="yellow"></Button> */}
            <TouchButton
                buttonStyle={{
                    backgroundColor: "green",
                    width: scaleSizeW(700),
                }}
                textStyle={{
                    color:"red"
                }}
                onPress={handlePress}
            >
                按钮
            </TouchButton>
            <View style={styles.parentRect}>
                <View style={[styles.rect, { backgroundColor: "red" }]}>
                    <Text>1</Text>
                </View>
                <View style={[styles.rect, { backgroundColor: "blue" }]}>
                    <Text>2</Text>
                </View>
            </View>
        </View>
    );
}
const styles = StyleSheet.create({
    container: {
        flex: 1,
        // justifyContent:"center",
        alignItems: "center",
    },
    textColor: {
        color: "blue",
    },
    textSize: {
        fontSize: setSpText(30),
    },
    parentRect: {
        flexDirection: "row",
    },
    rect: {
        width: scaleSizeW(375),
        height: scaleSizeH(100),
        backgroundColor: "red",
    },
});
